Left Termination of the query pattern convert_in_3(g, g, a) w.r.t. the given Prolog program could successfully be proven:



Prolog
  ↳ PrologToPiTRSProof

Clauses:

convert([], B, 0).
convert(.(0, XS), B, X) :- ','(convert(XS, B, Y), times(Y, B, X)).
convert(.(s(Y), XS), B, s(X)) :- convert(.(Y, XS), B, X).
plus(0, Y, Y).
plus(s(X), Y, s(Z)) :- plus(X, Y, Z).
times(0, Y, 0).
times(s(X), Y, Z) :- ','(times(X, Y, U), plus(Y, U, Z)).

Queries:

convert(g,g,a).

We use the technique of [30]. With regard to the inferred argument filtering the predicates were used in the following modes:
convert_in: (b,b,f)
times_in: (b,b,f)
plus_in: (b,b,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

convert_in_gga([], B, 0) → convert_out_gga([], B, 0)
convert_in_gga(.(0, XS), B, X) → U1_gga(XS, B, X, convert_in_gga(XS, B, Y))
convert_in_gga(.(s(Y), XS), B, s(X)) → U3_gga(Y, XS, B, X, convert_in_gga(.(Y, XS), B, X))
U3_gga(Y, XS, B, X, convert_out_gga(.(Y, XS), B, X)) → convert_out_gga(.(s(Y), XS), B, s(X))
U1_gga(XS, B, X, convert_out_gga(XS, B, Y)) → U2_gga(XS, B, X, times_in_gga(Y, B, X))
times_in_gga(0, Y, 0) → times_out_gga(0, Y, 0)
times_in_gga(s(X), Y, Z) → U5_gga(X, Y, Z, times_in_gga(X, Y, U))
U5_gga(X, Y, Z, times_out_gga(X, Y, U)) → U6_gga(X, Y, Z, plus_in_gga(Y, U, Z))
plus_in_gga(0, Y, Y) → plus_out_gga(0, Y, Y)
plus_in_gga(s(X), Y, s(Z)) → U4_gga(X, Y, Z, plus_in_gga(X, Y, Z))
U4_gga(X, Y, Z, plus_out_gga(X, Y, Z)) → plus_out_gga(s(X), Y, s(Z))
U6_gga(X, Y, Z, plus_out_gga(Y, U, Z)) → times_out_gga(s(X), Y, Z)
U2_gga(XS, B, X, times_out_gga(Y, B, X)) → convert_out_gga(.(0, XS), B, X)

The argument filtering Pi contains the following mapping:
convert_in_gga(x1, x2, x3)  =  convert_in_gga(x1, x2)
[]  =  []
convert_out_gga(x1, x2, x3)  =  convert_out_gga(x3)
.(x1, x2)  =  .(x1, x2)
0  =  0
U1_gga(x1, x2, x3, x4)  =  U1_gga(x2, x4)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4, x5)  =  U3_gga(x5)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x4)
times_in_gga(x1, x2, x3)  =  times_in_gga(x1, x2)
times_out_gga(x1, x2, x3)  =  times_out_gga(x3)
U5_gga(x1, x2, x3, x4)  =  U5_gga(x2, x4)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x4)
plus_in_gga(x1, x2, x3)  =  plus_in_gga(x1, x2)
plus_out_gga(x1, x2, x3)  =  plus_out_gga(x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x4)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

convert_in_gga([], B, 0) → convert_out_gga([], B, 0)
convert_in_gga(.(0, XS), B, X) → U1_gga(XS, B, X, convert_in_gga(XS, B, Y))
convert_in_gga(.(s(Y), XS), B, s(X)) → U3_gga(Y, XS, B, X, convert_in_gga(.(Y, XS), B, X))
U3_gga(Y, XS, B, X, convert_out_gga(.(Y, XS), B, X)) → convert_out_gga(.(s(Y), XS), B, s(X))
U1_gga(XS, B, X, convert_out_gga(XS, B, Y)) → U2_gga(XS, B, X, times_in_gga(Y, B, X))
times_in_gga(0, Y, 0) → times_out_gga(0, Y, 0)
times_in_gga(s(X), Y, Z) → U5_gga(X, Y, Z, times_in_gga(X, Y, U))
U5_gga(X, Y, Z, times_out_gga(X, Y, U)) → U6_gga(X, Y, Z, plus_in_gga(Y, U, Z))
plus_in_gga(0, Y, Y) → plus_out_gga(0, Y, Y)
plus_in_gga(s(X), Y, s(Z)) → U4_gga(X, Y, Z, plus_in_gga(X, Y, Z))
U4_gga(X, Y, Z, plus_out_gga(X, Y, Z)) → plus_out_gga(s(X), Y, s(Z))
U6_gga(X, Y, Z, plus_out_gga(Y, U, Z)) → times_out_gga(s(X), Y, Z)
U2_gga(XS, B, X, times_out_gga(Y, B, X)) → convert_out_gga(.(0, XS), B, X)

The argument filtering Pi contains the following mapping:
convert_in_gga(x1, x2, x3)  =  convert_in_gga(x1, x2)
[]  =  []
convert_out_gga(x1, x2, x3)  =  convert_out_gga(x3)
.(x1, x2)  =  .(x1, x2)
0  =  0
U1_gga(x1, x2, x3, x4)  =  U1_gga(x2, x4)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4, x5)  =  U3_gga(x5)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x4)
times_in_gga(x1, x2, x3)  =  times_in_gga(x1, x2)
times_out_gga(x1, x2, x3)  =  times_out_gga(x3)
U5_gga(x1, x2, x3, x4)  =  U5_gga(x2, x4)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x4)
plus_in_gga(x1, x2, x3)  =  plus_in_gga(x1, x2)
plus_out_gga(x1, x2, x3)  =  plus_out_gga(x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x4)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

CONVERT_IN_GGA(.(0, XS), B, X) → U1_GGA(XS, B, X, convert_in_gga(XS, B, Y))
CONVERT_IN_GGA(.(0, XS), B, X) → CONVERT_IN_GGA(XS, B, Y)
CONVERT_IN_GGA(.(s(Y), XS), B, s(X)) → U3_GGA(Y, XS, B, X, convert_in_gga(.(Y, XS), B, X))
CONVERT_IN_GGA(.(s(Y), XS), B, s(X)) → CONVERT_IN_GGA(.(Y, XS), B, X)
U1_GGA(XS, B, X, convert_out_gga(XS, B, Y)) → U2_GGA(XS, B, X, times_in_gga(Y, B, X))
U1_GGA(XS, B, X, convert_out_gga(XS, B, Y)) → TIMES_IN_GGA(Y, B, X)
TIMES_IN_GGA(s(X), Y, Z) → U5_GGA(X, Y, Z, times_in_gga(X, Y, U))
TIMES_IN_GGA(s(X), Y, Z) → TIMES_IN_GGA(X, Y, U)
U5_GGA(X, Y, Z, times_out_gga(X, Y, U)) → U6_GGA(X, Y, Z, plus_in_gga(Y, U, Z))
U5_GGA(X, Y, Z, times_out_gga(X, Y, U)) → PLUS_IN_GGA(Y, U, Z)
PLUS_IN_GGA(s(X), Y, s(Z)) → U4_GGA(X, Y, Z, plus_in_gga(X, Y, Z))
PLUS_IN_GGA(s(X), Y, s(Z)) → PLUS_IN_GGA(X, Y, Z)

The TRS R consists of the following rules:

convert_in_gga([], B, 0) → convert_out_gga([], B, 0)
convert_in_gga(.(0, XS), B, X) → U1_gga(XS, B, X, convert_in_gga(XS, B, Y))
convert_in_gga(.(s(Y), XS), B, s(X)) → U3_gga(Y, XS, B, X, convert_in_gga(.(Y, XS), B, X))
U3_gga(Y, XS, B, X, convert_out_gga(.(Y, XS), B, X)) → convert_out_gga(.(s(Y), XS), B, s(X))
U1_gga(XS, B, X, convert_out_gga(XS, B, Y)) → U2_gga(XS, B, X, times_in_gga(Y, B, X))
times_in_gga(0, Y, 0) → times_out_gga(0, Y, 0)
times_in_gga(s(X), Y, Z) → U5_gga(X, Y, Z, times_in_gga(X, Y, U))
U5_gga(X, Y, Z, times_out_gga(X, Y, U)) → U6_gga(X, Y, Z, plus_in_gga(Y, U, Z))
plus_in_gga(0, Y, Y) → plus_out_gga(0, Y, Y)
plus_in_gga(s(X), Y, s(Z)) → U4_gga(X, Y, Z, plus_in_gga(X, Y, Z))
U4_gga(X, Y, Z, plus_out_gga(X, Y, Z)) → plus_out_gga(s(X), Y, s(Z))
U6_gga(X, Y, Z, plus_out_gga(Y, U, Z)) → times_out_gga(s(X), Y, Z)
U2_gga(XS, B, X, times_out_gga(Y, B, X)) → convert_out_gga(.(0, XS), B, X)

The argument filtering Pi contains the following mapping:
convert_in_gga(x1, x2, x3)  =  convert_in_gga(x1, x2)
[]  =  []
convert_out_gga(x1, x2, x3)  =  convert_out_gga(x3)
.(x1, x2)  =  .(x1, x2)
0  =  0
U1_gga(x1, x2, x3, x4)  =  U1_gga(x2, x4)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4, x5)  =  U3_gga(x5)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x4)
times_in_gga(x1, x2, x3)  =  times_in_gga(x1, x2)
times_out_gga(x1, x2, x3)  =  times_out_gga(x3)
U5_gga(x1, x2, x3, x4)  =  U5_gga(x2, x4)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x4)
plus_in_gga(x1, x2, x3)  =  plus_in_gga(x1, x2)
plus_out_gga(x1, x2, x3)  =  plus_out_gga(x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x4)
U3_GGA(x1, x2, x3, x4, x5)  =  U3_GGA(x5)
U6_GGA(x1, x2, x3, x4)  =  U6_GGA(x4)
U4_GGA(x1, x2, x3, x4)  =  U4_GGA(x4)
TIMES_IN_GGA(x1, x2, x3)  =  TIMES_IN_GGA(x1, x2)
PLUS_IN_GGA(x1, x2, x3)  =  PLUS_IN_GGA(x1, x2)
U2_GGA(x1, x2, x3, x4)  =  U2_GGA(x4)
CONVERT_IN_GGA(x1, x2, x3)  =  CONVERT_IN_GGA(x1, x2)
U5_GGA(x1, x2, x3, x4)  =  U5_GGA(x2, x4)
U1_GGA(x1, x2, x3, x4)  =  U1_GGA(x2, x4)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

Pi DP problem:
The TRS P consists of the following rules:

CONVERT_IN_GGA(.(0, XS), B, X) → U1_GGA(XS, B, X, convert_in_gga(XS, B, Y))
CONVERT_IN_GGA(.(0, XS), B, X) → CONVERT_IN_GGA(XS, B, Y)
CONVERT_IN_GGA(.(s(Y), XS), B, s(X)) → U3_GGA(Y, XS, B, X, convert_in_gga(.(Y, XS), B, X))
CONVERT_IN_GGA(.(s(Y), XS), B, s(X)) → CONVERT_IN_GGA(.(Y, XS), B, X)
U1_GGA(XS, B, X, convert_out_gga(XS, B, Y)) → U2_GGA(XS, B, X, times_in_gga(Y, B, X))
U1_GGA(XS, B, X, convert_out_gga(XS, B, Y)) → TIMES_IN_GGA(Y, B, X)
TIMES_IN_GGA(s(X), Y, Z) → U5_GGA(X, Y, Z, times_in_gga(X, Y, U))
TIMES_IN_GGA(s(X), Y, Z) → TIMES_IN_GGA(X, Y, U)
U5_GGA(X, Y, Z, times_out_gga(X, Y, U)) → U6_GGA(X, Y, Z, plus_in_gga(Y, U, Z))
U5_GGA(X, Y, Z, times_out_gga(X, Y, U)) → PLUS_IN_GGA(Y, U, Z)
PLUS_IN_GGA(s(X), Y, s(Z)) → U4_GGA(X, Y, Z, plus_in_gga(X, Y, Z))
PLUS_IN_GGA(s(X), Y, s(Z)) → PLUS_IN_GGA(X, Y, Z)

The TRS R consists of the following rules:

convert_in_gga([], B, 0) → convert_out_gga([], B, 0)
convert_in_gga(.(0, XS), B, X) → U1_gga(XS, B, X, convert_in_gga(XS, B, Y))
convert_in_gga(.(s(Y), XS), B, s(X)) → U3_gga(Y, XS, B, X, convert_in_gga(.(Y, XS), B, X))
U3_gga(Y, XS, B, X, convert_out_gga(.(Y, XS), B, X)) → convert_out_gga(.(s(Y), XS), B, s(X))
U1_gga(XS, B, X, convert_out_gga(XS, B, Y)) → U2_gga(XS, B, X, times_in_gga(Y, B, X))
times_in_gga(0, Y, 0) → times_out_gga(0, Y, 0)
times_in_gga(s(X), Y, Z) → U5_gga(X, Y, Z, times_in_gga(X, Y, U))
U5_gga(X, Y, Z, times_out_gga(X, Y, U)) → U6_gga(X, Y, Z, plus_in_gga(Y, U, Z))
plus_in_gga(0, Y, Y) → plus_out_gga(0, Y, Y)
plus_in_gga(s(X), Y, s(Z)) → U4_gga(X, Y, Z, plus_in_gga(X, Y, Z))
U4_gga(X, Y, Z, plus_out_gga(X, Y, Z)) → plus_out_gga(s(X), Y, s(Z))
U6_gga(X, Y, Z, plus_out_gga(Y, U, Z)) → times_out_gga(s(X), Y, Z)
U2_gga(XS, B, X, times_out_gga(Y, B, X)) → convert_out_gga(.(0, XS), B, X)

The argument filtering Pi contains the following mapping:
convert_in_gga(x1, x2, x3)  =  convert_in_gga(x1, x2)
[]  =  []
convert_out_gga(x1, x2, x3)  =  convert_out_gga(x3)
.(x1, x2)  =  .(x1, x2)
0  =  0
U1_gga(x1, x2, x3, x4)  =  U1_gga(x2, x4)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4, x5)  =  U3_gga(x5)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x4)
times_in_gga(x1, x2, x3)  =  times_in_gga(x1, x2)
times_out_gga(x1, x2, x3)  =  times_out_gga(x3)
U5_gga(x1, x2, x3, x4)  =  U5_gga(x2, x4)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x4)
plus_in_gga(x1, x2, x3)  =  plus_in_gga(x1, x2)
plus_out_gga(x1, x2, x3)  =  plus_out_gga(x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x4)
U3_GGA(x1, x2, x3, x4, x5)  =  U3_GGA(x5)
U6_GGA(x1, x2, x3, x4)  =  U6_GGA(x4)
U4_GGA(x1, x2, x3, x4)  =  U4_GGA(x4)
TIMES_IN_GGA(x1, x2, x3)  =  TIMES_IN_GGA(x1, x2)
PLUS_IN_GGA(x1, x2, x3)  =  PLUS_IN_GGA(x1, x2)
U2_GGA(x1, x2, x3, x4)  =  U2_GGA(x4)
CONVERT_IN_GGA(x1, x2, x3)  =  CONVERT_IN_GGA(x1, x2)
U5_GGA(x1, x2, x3, x4)  =  U5_GGA(x2, x4)
U1_GGA(x1, x2, x3, x4)  =  U1_GGA(x2, x4)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 3 SCCs with 8 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

PLUS_IN_GGA(s(X), Y, s(Z)) → PLUS_IN_GGA(X, Y, Z)

The TRS R consists of the following rules:

convert_in_gga([], B, 0) → convert_out_gga([], B, 0)
convert_in_gga(.(0, XS), B, X) → U1_gga(XS, B, X, convert_in_gga(XS, B, Y))
convert_in_gga(.(s(Y), XS), B, s(X)) → U3_gga(Y, XS, B, X, convert_in_gga(.(Y, XS), B, X))
U3_gga(Y, XS, B, X, convert_out_gga(.(Y, XS), B, X)) → convert_out_gga(.(s(Y), XS), B, s(X))
U1_gga(XS, B, X, convert_out_gga(XS, B, Y)) → U2_gga(XS, B, X, times_in_gga(Y, B, X))
times_in_gga(0, Y, 0) → times_out_gga(0, Y, 0)
times_in_gga(s(X), Y, Z) → U5_gga(X, Y, Z, times_in_gga(X, Y, U))
U5_gga(X, Y, Z, times_out_gga(X, Y, U)) → U6_gga(X, Y, Z, plus_in_gga(Y, U, Z))
plus_in_gga(0, Y, Y) → plus_out_gga(0, Y, Y)
plus_in_gga(s(X), Y, s(Z)) → U4_gga(X, Y, Z, plus_in_gga(X, Y, Z))
U4_gga(X, Y, Z, plus_out_gga(X, Y, Z)) → plus_out_gga(s(X), Y, s(Z))
U6_gga(X, Y, Z, plus_out_gga(Y, U, Z)) → times_out_gga(s(X), Y, Z)
U2_gga(XS, B, X, times_out_gga(Y, B, X)) → convert_out_gga(.(0, XS), B, X)

The argument filtering Pi contains the following mapping:
convert_in_gga(x1, x2, x3)  =  convert_in_gga(x1, x2)
[]  =  []
convert_out_gga(x1, x2, x3)  =  convert_out_gga(x3)
.(x1, x2)  =  .(x1, x2)
0  =  0
U1_gga(x1, x2, x3, x4)  =  U1_gga(x2, x4)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4, x5)  =  U3_gga(x5)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x4)
times_in_gga(x1, x2, x3)  =  times_in_gga(x1, x2)
times_out_gga(x1, x2, x3)  =  times_out_gga(x3)
U5_gga(x1, x2, x3, x4)  =  U5_gga(x2, x4)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x4)
plus_in_gga(x1, x2, x3)  =  plus_in_gga(x1, x2)
plus_out_gga(x1, x2, x3)  =  plus_out_gga(x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x4)
PLUS_IN_GGA(x1, x2, x3)  =  PLUS_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

PLUS_IN_GGA(s(X), Y, s(Z)) → PLUS_IN_GGA(X, Y, Z)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
PLUS_IN_GGA(x1, x2, x3)  =  PLUS_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

PLUS_IN_GGA(s(X), Y) → PLUS_IN_GGA(X, Y)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

TIMES_IN_GGA(s(X), Y, Z) → TIMES_IN_GGA(X, Y, U)

The TRS R consists of the following rules:

convert_in_gga([], B, 0) → convert_out_gga([], B, 0)
convert_in_gga(.(0, XS), B, X) → U1_gga(XS, B, X, convert_in_gga(XS, B, Y))
convert_in_gga(.(s(Y), XS), B, s(X)) → U3_gga(Y, XS, B, X, convert_in_gga(.(Y, XS), B, X))
U3_gga(Y, XS, B, X, convert_out_gga(.(Y, XS), B, X)) → convert_out_gga(.(s(Y), XS), B, s(X))
U1_gga(XS, B, X, convert_out_gga(XS, B, Y)) → U2_gga(XS, B, X, times_in_gga(Y, B, X))
times_in_gga(0, Y, 0) → times_out_gga(0, Y, 0)
times_in_gga(s(X), Y, Z) → U5_gga(X, Y, Z, times_in_gga(X, Y, U))
U5_gga(X, Y, Z, times_out_gga(X, Y, U)) → U6_gga(X, Y, Z, plus_in_gga(Y, U, Z))
plus_in_gga(0, Y, Y) → plus_out_gga(0, Y, Y)
plus_in_gga(s(X), Y, s(Z)) → U4_gga(X, Y, Z, plus_in_gga(X, Y, Z))
U4_gga(X, Y, Z, plus_out_gga(X, Y, Z)) → plus_out_gga(s(X), Y, s(Z))
U6_gga(X, Y, Z, plus_out_gga(Y, U, Z)) → times_out_gga(s(X), Y, Z)
U2_gga(XS, B, X, times_out_gga(Y, B, X)) → convert_out_gga(.(0, XS), B, X)

The argument filtering Pi contains the following mapping:
convert_in_gga(x1, x2, x3)  =  convert_in_gga(x1, x2)
[]  =  []
convert_out_gga(x1, x2, x3)  =  convert_out_gga(x3)
.(x1, x2)  =  .(x1, x2)
0  =  0
U1_gga(x1, x2, x3, x4)  =  U1_gga(x2, x4)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4, x5)  =  U3_gga(x5)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x4)
times_in_gga(x1, x2, x3)  =  times_in_gga(x1, x2)
times_out_gga(x1, x2, x3)  =  times_out_gga(x3)
U5_gga(x1, x2, x3, x4)  =  U5_gga(x2, x4)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x4)
plus_in_gga(x1, x2, x3)  =  plus_in_gga(x1, x2)
plus_out_gga(x1, x2, x3)  =  plus_out_gga(x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x4)
TIMES_IN_GGA(x1, x2, x3)  =  TIMES_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

TIMES_IN_GGA(s(X), Y, Z) → TIMES_IN_GGA(X, Y, U)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
TIMES_IN_GGA(x1, x2, x3)  =  TIMES_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

TIMES_IN_GGA(s(X), Y) → TIMES_IN_GGA(X, Y)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof

Pi DP problem:
The TRS P consists of the following rules:

CONVERT_IN_GGA(.(s(Y), XS), B, s(X)) → CONVERT_IN_GGA(.(Y, XS), B, X)
CONVERT_IN_GGA(.(0, XS), B, X) → CONVERT_IN_GGA(XS, B, Y)

The TRS R consists of the following rules:

convert_in_gga([], B, 0) → convert_out_gga([], B, 0)
convert_in_gga(.(0, XS), B, X) → U1_gga(XS, B, X, convert_in_gga(XS, B, Y))
convert_in_gga(.(s(Y), XS), B, s(X)) → U3_gga(Y, XS, B, X, convert_in_gga(.(Y, XS), B, X))
U3_gga(Y, XS, B, X, convert_out_gga(.(Y, XS), B, X)) → convert_out_gga(.(s(Y), XS), B, s(X))
U1_gga(XS, B, X, convert_out_gga(XS, B, Y)) → U2_gga(XS, B, X, times_in_gga(Y, B, X))
times_in_gga(0, Y, 0) → times_out_gga(0, Y, 0)
times_in_gga(s(X), Y, Z) → U5_gga(X, Y, Z, times_in_gga(X, Y, U))
U5_gga(X, Y, Z, times_out_gga(X, Y, U)) → U6_gga(X, Y, Z, plus_in_gga(Y, U, Z))
plus_in_gga(0, Y, Y) → plus_out_gga(0, Y, Y)
plus_in_gga(s(X), Y, s(Z)) → U4_gga(X, Y, Z, plus_in_gga(X, Y, Z))
U4_gga(X, Y, Z, plus_out_gga(X, Y, Z)) → plus_out_gga(s(X), Y, s(Z))
U6_gga(X, Y, Z, plus_out_gga(Y, U, Z)) → times_out_gga(s(X), Y, Z)
U2_gga(XS, B, X, times_out_gga(Y, B, X)) → convert_out_gga(.(0, XS), B, X)

The argument filtering Pi contains the following mapping:
convert_in_gga(x1, x2, x3)  =  convert_in_gga(x1, x2)
[]  =  []
convert_out_gga(x1, x2, x3)  =  convert_out_gga(x3)
.(x1, x2)  =  .(x1, x2)
0  =  0
U1_gga(x1, x2, x3, x4)  =  U1_gga(x2, x4)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4, x5)  =  U3_gga(x5)
U2_gga(x1, x2, x3, x4)  =  U2_gga(x4)
times_in_gga(x1, x2, x3)  =  times_in_gga(x1, x2)
times_out_gga(x1, x2, x3)  =  times_out_gga(x3)
U5_gga(x1, x2, x3, x4)  =  U5_gga(x2, x4)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x4)
plus_in_gga(x1, x2, x3)  =  plus_in_gga(x1, x2)
plus_out_gga(x1, x2, x3)  =  plus_out_gga(x3)
U4_gga(x1, x2, x3, x4)  =  U4_gga(x4)
CONVERT_IN_GGA(x1, x2, x3)  =  CONVERT_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof

Pi DP problem:
The TRS P consists of the following rules:

CONVERT_IN_GGA(.(s(Y), XS), B, s(X)) → CONVERT_IN_GGA(.(Y, XS), B, X)
CONVERT_IN_GGA(.(0, XS), B, X) → CONVERT_IN_GGA(XS, B, Y)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
0  =  0
s(x1)  =  s(x1)
CONVERT_IN_GGA(x1, x2, x3)  =  CONVERT_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ UsableRulesReductionPairsProof

Q DP problem:
The TRS P consists of the following rules:

CONVERT_IN_GGA(.(0, XS), B) → CONVERT_IN_GGA(XS, B)
CONVERT_IN_GGA(.(s(Y), XS), B) → CONVERT_IN_GGA(.(Y, XS), B)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the usable rules with reduction pair processor [15] with a polynomial ordering [25], all dependency pairs and the corresponding usable rules [17] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

The following dependency pairs can be deleted:

CONVERT_IN_GGA(.(0, XS), B) → CONVERT_IN_GGA(XS, B)
CONVERT_IN_GGA(.(s(Y), XS), B) → CONVERT_IN_GGA(.(Y, XS), B)
No rules are removed from R.

Used ordering: POLO with Polynomial interpretation [25]:

POL(.(x1, x2)) = 2·x1 + x2   
POL(0) = 0   
POL(CONVERT_IN_GGA(x1, x2)) = 2·x1 + x2   
POL(s(x1)) = 2·x1   



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ UsableRulesReductionPairsProof
QDP
                            ↳ PisEmptyProof

Q DP problem:
P is empty.
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.